from faker import Faker
from openpyxl import Workbook

fake = Faker(locale='zh_CN')
# print(fake.email().replace('@example', '@git.cn'))
wb = Workbook()
active_sheet=wb.active
active_sheet.append(['姓名','地址','邮箱','电话'])
def generate(n):
    for i in range(0,n):
        name = fake.name()
        site = fake.address()
        email = fake.email().replace('@example','@git.cn')
        phone = fake.phone_number()
        active_sheet.append([name, site,  email, phone, ])
    wb.save("Faker.xlsx")


generate(101)


